<?php

include('../include/dbFunctions.php');

//Innitialization of variable
$table = 'student';

//Retrieve data from POST
$student_name = escapeString($_POST['student_name']);
$student_birthday = $_POST['student_birthday'];
$student_phone = $_POST['student_phone'];
$event_id=1;
            //$event_id=$_SESSION['event_id'];

//Add data to database
$query = "INSERT INTO " . $table . " (
            student_name,
            student_birthday,
            student_phone,
            event_id
            )
            VALUES(
            $student_name,'$student_birthday','$student_phone','$event_id'
            );";
$result = executeQuery($query);

echo $result; //1 for success and 0 for failure
?>
